package com.lgh.demo.util;

import android.app.Activity;
import android.app.Dialog;
import android.graphics.Bitmap;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;

import com.lgh.demo.R;

public class DialogUtils {

    public static void showDialog(Activity context, Bitmap bitmap) {
        final Dialog exitDialog = new Dialog(context, R.style.MyDialog);
        exitDialog.setContentView(R.layout.dialog_img);
        ImageView ivRec = exitDialog.findViewById(R.id.iv_img);
        ivRec.setImageBitmap(bitmap);

        LinearLayout warp = exitDialog.findViewById(R.id.ll_dialog);
        FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(Tools.getDisplayWidth(context),
                Tools.getDisplayHeight(context));
        warp.setLayoutParams(lp);
        exitDialog.show();
    }


}
